package bird;

import java.awt.Graphics;
import java.awt.Image;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;


public class BackGround extends FlyingObject{
	
	private int x2=-800;
	
	public BackGround() {
		this.width=Config.FRAME_WIDTH;
		this.height=Config.FRAME_HEIGHT;
	}
	
	public void paintSelf(Graphics g) {
	    g.drawImage(back_img2, x2, y, width,height,null);
		g.drawImage(back_img, x, y, width,height,null);
	}
	
	public void move() {
		this.x++;
		this.x2++;
		if(x>=800){
			x=-800;
		}
		if(x2>=800) {
			x2=-800;
		}
		
	}
}
